<template>
	<!-- 社交 -->
	<view class="content">
		<view class="tab_box">
			<view class="tab_item" :class="{'current': current == index}" v-for="(item,index) in tabList" @click="tabclick(index)">
				<text > {{ item.name }}</text>
				<view class="line"></view>	
			</view>
			
		</view>
		
		<view class="socialize_content">
			<SocializeDistance v-if="current == 0"></SocializeDistance>
			<SocializeMy v-if="current == 2"></SocializeMy>
		</view>
	</view>
</template>


<script>
	
	import SocializeDistance from "@/components/socialize_distance/socialize_distance.vue"
	import SocializeMy from "@/components/socialize_distance/socialize_my.vue"
	
	export default {
		data() {
			return {
				tabList: [
					{	
						
					    name: '距离',
					}, {
					    name: '在线',
					}, {
					    name: '我的'
					}
				],
				current: 2
			}
		},
		methods: {
			tabclick(e) {
				this.current = e
			}
		},
		components: {
			SocializeDistance,
			SocializeMy
		}
	}
</script>

<style lang="scss">
	.content {
		height: 100%;
		background-color: #fff;
		.tab_box {
			display: flex;
			align-items: center;
			height: 85rpx;
			padding-top: 30rpx;
			background-color: #fff;
			border-top: 1rpx solid rgba(0, 0, 0, 0.05);
			box-sizing: border-box;
			
			.tab_item {
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				align-items: center;
				height: 50rpx;
				margin: 0 60rpx;
				font-size: 26rpx;
				color: #333333;
				.line {
					width: 100%;
					height: 6rpx;
					border-radius: 3rpx;
					background-color: #fff;
				}
				
			}
			.current {
				color: #0156F6;
				.line {
					background-color: #0156F6;
				}
			}
			
		}
	
		.socialize_content {
			margin-top: 35rpx;
			
		}
	
	}
</style>
